package org.springblade.modules.admin.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import org.springblade.modules.admin.entity.MaintainReport;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.admin.entity.MaintainReportSend;

import java.util.List;

public interface MaintainReportService extends BaseService<MaintainReport> {

	MaintainReport selectReportByWxPlan(Long planId);

	/**
	 * @Author lsay
	 * @Description {
	 *   查询报告分页
	 * }
	 * @Date 13:49 2024/7/22
	 * @Param
	 * @return
	 **/
	IPage<MaintainReport> selectReportPage(IPage<MaintainReport> page, MaintainReport report);

	List<MaintainReport> selectReportList(MaintainReport report);

	MaintainReport detail(Long reportId);

	Boolean sendReport(Long reportId);

	/**
	 * @Author lsay
	 * @Description {
	 *   报告发送记录
	 * }
	 * @Date 15:48 2024/7/18
	 * @Param
	 **/
	Boolean sendLog(MaintainReportSend send);

	/**
	 * @Author lsay
	 * @Description {
	 *   报告发送记录
	 * }
	 * @Date 9:22 2024/7/22
	 * @Param {
	 *     reportId 报告id
	 *     contentType 1-小程序卡片 2-PDF 3-图片
	 *     status 状态 1-已发送 2-发送失败
	 * }
	 * @return 成功与否
	 **/
	Boolean sendLog(Long reportId, Integer contentType, Integer status);

	/**
	 * @Author lsay
	 * @Description {
	 *   报告发送记录
	 * }
	 * @Date 9:22 2024/7/22
	 * @Param {
	 *     reportId 报告id
	 *     contentType 1-小程序卡片 2-PDF 3-图片
	 *     status 状态 1-已发送 2-发送失败
	 *     userId 发送人
	 * }
	 * @return 成功与否
	 **/
	Boolean sendLog(Long reportId, Integer contentType, Integer status,Long userId);

    List<MaintainReportSend> selectReportSendLog(Long reportId);

    void downExcel(MaintainReport report, List<List<String>> rows);
}
